<!doctype html>
<html>
<head>
    <title>{$INI['system']['sitename']} {$city['name']}</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <link rel="stylesheet" href="/css/style.css">
    <link rel="stylesheet" href="/css/font-awesome.min-4.3.0.css">
	<script src="/js/jquery.min-2.1.3.js"></script>
	<script>
	$(function(){
		
	})
	</script>
</head>
<style>
.coup_one{width:98%;}
.fixed_nav_item{width:50%;}
</style>
<body>
  <div>
    <div></div>			
     <div class="nav_fixed">
        <a href="/account/cards.php?state=1" class="fixed_nav_item <!--{if $state == 1}-->nav_cur<!--{/if}-->"><span class="nav_txt">红包</span></a>
        <a href="/account/cards.php?state=2" class="fixed_nav_item <!--{if $state == 2}-->nav_cur<!--{/if}-->" style="display:none;" > 
		<span class="nav_txt nav_receiving">未激活<b class="nav_payment_num" style="display:none;">2</b></span></a>
        <a href="/account/cards.php?state=3" class="fixed_nav_item <!--{if $state == 3}-->nav_cur<!--{/if}-->">
		<span class="nav_txt nav_receiving">已使用/已过期<b class="nav_receiving_num" style="display:none;">3</b></span></a>
    </div>
	
    <div id="dealliststatus1">
	
	
		<div id="wrapper_coupons" style="padding-top:10px;">
		
		<!--{loop $orders $index $one}-->	
        <div class="coup_one" id="orderdel_{$one['id']}">
			<img src="/images/liofis_quan.jpg" class="coup_img" />
			<div class="coup_tit">{$INI['system']['sitename']}</div>
			<div class="coup_text_left1">
				<b>{$one['credit']}元红包券</b>
				<div class="text_copus_desc1">
				优质水果，新鲜直送～
				</div>
			</div>
			<div class="coup_time_right1">
				<!--{if $one['consume'] =='Y'}-->
					<b style="color:red;padding-top:13px;display:block;padding-left:12px;">已使用</b>
				<!--{else}-->
					<b>有效期</b>
					<div class="text_copus_time1">
					${date('Y-m-d',$one['begin_time'])}
					<br/>
					${date('Y-m-d',$one['end_time'])}
					</div>
				<!--{/if}-->
				
				
			</div>
        </div>
		<!--{/loop}-->
		</div>
		
		
		<div style="display:none;"><div>{$pagestring}</div></div>
		
         <div>
		 <div class="center" id="center_pullup" style="display:none;">
		 <span><img class="img_rotate" src="/images/pull_loading_8eba142.png"/>
		 </span><span class="orders_text"></span>
		 </div>
		<script>
		var offset = 0;
		var _pa = 2;
		var is_can_next = 1;
		var cur_url = "{$cur_url}";
		function loaddata()
		{ 
			totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop());     //浏览器的高度加上滚动条的高度 

			if ($(document).height() <= totalheight+200)     //当文档的高度小于或者等于总的高度的时候，开始动态加载数据
			{ 
				if(is_can_next == 1)//加载数据
				{
					is_can_next = 0;
					nextpage();
				}
			} 
		} 
		function orderdel(id)
		{
			var del_url = '/ajax/order.php?action=orderdel&id='+id
			
			$.ajax(
				{ 
					url: del_url, 
					dataType: 'json', 
					success: function(result){
						if(result.ret>0){
							//get_exp
							$('#orderdel_'+id).fadeOut();
							//$('.nextpage').hide();	
							return false;
						}
						
					}
				})
		}
		function can_get_express(id)
		{
			var gt_url = '/ajax/order.php?action=orderget&id='+id;
			$.ajax(
				{ 
					url: gt_url, 
					dataType: 'json', 
					success: function(result){
						if(result.ret>0){
							//get_exp
							
							$('#get_exp'+id).hide();
							$('#get_exp_s'+id).show();
							//$('.nextpage').hide();	
							return false;
						}
						
					}
				})
		}
		//rel="&id={$one['id']}"
		
		function nextpage()
		{	
			var best_url = cur_url+'&page='+_pa;
			$('#center_pullup').show();
			$.ajax(
				{ 
					url: best_url, 
					dataType: 'json', 
					success: function(result){
						if(result.ret>0){
							if(_pa != 1)
							{
								$('#center_pullup').hide();
							}
							//$('.nextpage').hide();	
							return false;
						}
						if(result.offset == offset)
						{
							$('#center_pullup').hide();
							return false;
						} else {
							offset = result.offset;
						}
						$('#wrapper_coupons').append(result.html);
						$('#center_pullup').hide();
						_pa++;
						is_can_next = 1;
					}
				}
			);
		}

		$(function(){
			
			$(window).scroll( function() { 
				loaddata();
			}); 
			
		})
		</script>
	
  </div>
    <div style="height:58px;visibility:hidden "></div>
    <!--{include footer}-->




